﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AlbumDetail.aspx.cs" ValidateRequest="false" Inherits="RioStudio.Website.View.Gallery.AlbumDetail" %>

<asp:Content ID="Content0" ContentPlaceHolderID="TitleMain" runat="server">
    Ảnh
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <telerik:RadCodeBlock runat="server">
        <meta property="og:title" content='<%= this.Title %>' />
        <meta property="og:url" content='http://<%= Request.Url.Host + "/Album/" + Request["slug"] %>' />
        <meta property="og:image" content='<%= this.Image %>' />
        <meta property="og:site_name" content="Riostudio" />
        <link rel="image_src" href='<%= "http://riostudio.vn/ImageHandler.axd?image=" + this.Image + "&height=50&width=50" %>' />
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7" IsSticky="false" />
    <div class="rio-album-detail table-row">
        <div class="container" style="display: table">
            <div class="top table-row">
                <div class="title table-cell">
                    <div class="rio-title">
                        <asp:Label ID="lblGalleryName" runat="server" />
                    </div>
                    <div class="rio-subtitle">
                        <asp:Label ID="lblGalleryPlace" runat="server" /></div>
                </div>
            </div>
            <div class="middle table-row">
                <div class="left table-cell">
                    <div style="display: table">
                        <div class="table-row">
                            <a rel="gallery" class="image-clickable" runat="server" id="lnkFirstImage">
                                <asp:Image ID="imgFirstImage" CssClass="avatar" Width="549" Height="337" runat="server" />
                            </a>
                        </div>
                        <div class="table-row" style="padding: 5px 5px 5px 0">
                            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                                <%= this.Description %>
                            </telerik:RadCodeBlock>
                        </div>
                        <div class="table-row">
                            <div style="display: table; width:100%">
                                <div class="table-row">
                                    <div class="rio-title table-cell" style="width:50%">
                                        Comments
                                    </div>
                                    <div style="text-align: right; vertical-align:middle" class="table-cell">
                                        <telerik:RadScriptBlock ID="facebookLikeScriptBlock" runat="server">
                                            <script>                                                (function (d, s, id) {
                                                    var js, fjs = d.getElementsByTagName(s)[0];
                                                    if (d.getElementById(id)) return;
                                                    js = d.createElement(s); js.id = id;
                                                    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                                                    fjs.parentNode.insertBefore(js, fjs);
                                                } (document, 'script', 'facebook-jssdk'));</script>
                                        </telerik:RadScriptBlock>
                                        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
                                            <fb:like id="likeBox" href='<%= Request.Url.Host + "/Album/" + Request["slug"] %>' send="false" layout="button_count" width="50" show_faces="false">
                                            </fb:like>
                                        </telerik:RadCodeBlock>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="table-row">
                            <telerik:RadAjaxPanel ID="RadAjaxPanel1" CssClass="table-cell" runat="server">
                                <telerik:RadListView ID="rlvComment" ItemPlaceholderID="itemHolder" runat="server" OnNeedDataSource="rlvComment_NeedDataSource" OnItemCommand="rlvComment_ItemCommand" DataKeyNames="GalleryCommentID">
                                    <LayoutTemplate>
                                        <asp:PlaceHolder ID="itemHolder" runat="server" />
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <div style="background-color: #000; border-bottom: 1px solid #161616;">
                                            <table cellpadding="0" cellspacing="0" style="padding: 5px; line-height: 18px; border-collapse: separate">
                                                <tr>
                                                    <td>
                                                        <span class="boldWhite">
                                                            <%# HttpUtility.HtmlEncode(Eval("PostedName").ToString()) %></span><span class="footer"> (<%# Eval("CreatedDate") %>)</span>
                                                        <% if (HttpContext.Current.User.Identity.IsAuthenticated)
                                                           {%>
                                                        <span>
                                                            <asp:LinkButton ID="LinkButton1" Text='<%# bool.Parse(Eval("IsApproved").ToString()) ? "Bỏ duyệt" : "Duyệt" %>' runat="server" CommandArgument='<%# Eval("GalleryCommentID") %>' CommandName='<%# bool.Parse(Eval("IsApproved").ToString()) ? "Unapprove" : "Approve" %>' />
                                                            |
                                                            <asp:LinkButton ID="LinkButton2" runat="server" Text="Xóa" CommandArgument='<%# Eval("GalleryCommentID") %>' CommandName="Remove" OnClientClick="return confirm('Có phải bạn muốn xóa lời bình luận này?');" /></span>
                                                        <%} %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%# HttpUtility.HtmlEncode(Eval("Detail").ToString()) %>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ItemTemplate>
                                    <EmptyItemTemplate>
                                        Chưa có bình luận gì
                                    </EmptyItemTemplate>
                                </telerik:RadListView>
                                <div style="background-color: #777; border-bottom: 1px solid #161616;">
                                    <table cellpadding="0" cellspacing="0" style="padding: 5px; line-height: 18px; border-collapse: separate">
                                        <tr>
                                            <td style="color: #333; font-weight: bold;">
                                                Gửi comment
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <telerik:RadTextBox ID="txtFullname" runat="server" Width="539px" MaxLength="255" EmptyMessage="Họ và tên bạn" Style="background-color: #666; border: 0px; padding: 5px;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding: 5px 0px 5px 0px;">
                                                <telerik:RadTextBox ID="txtDetail" runat="server" Width="539px" TextMode="MultiLine" Style="background-color: #666; border: 0px; padding: 5px; font-family: Arial, Helvetica, sans-serif; font-size: 12px;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding: 5px 0px 5px 0px;" align="right">
                                                <asp:ImageButton ID="btnSend" runat="server" ImageUrl="~/Content/Images/sendBtn.jpg" OnClick="btnSend_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </telerik:RadAjaxPanel>
                        </div>
                    </div>
                    <div class="clear-fix">
                    </div>
                </div>
                <div class="right table-cell">
                    <telerik:RadListView ID="rlvAnotherImage" runat="server" OnNeedDataSource="rlvAnotherImage_OnNeedDataSource" ItemPlaceholderID="itemHolder">
                        <LayoutTemplate>
                            <ul style="list-style: none;">
                                <asp:PlaceHolder ID="itemHolder" runat="server" />
                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li style="display: inline-block; width: 32%">
                                <div style="margin: 0 0 5px 5px; text-align: center; background-color: #000;" class="thumbnail">
                                    <a rel="gallery" class="image-clickable" href='<%# Eval("ImageLink") %>'>
                                        <img id='<%# Eval("ImageID") %>' src='/ImageHandler.axd?image=<%# Eval("ImageLink") %>&Height=62' alt='<%# Eval("ImageName") %>' style="cursor: pointer" />
                                    </a>
                                    <div class="clear-fix">
                                    </div>
                                </div>
                            </li>
                        </ItemTemplate>
                    </telerik:RadListView>
                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                        <script type="text/javascript">
                            $(document).ready(function () {
                                $("a.image-clickable").fancybox();
                            });
                        </script>
                    </telerik:RadScriptBlock>
                    <div class="title">
                        <div class="rio-title">
                            Others
                        </div>
                        <div class="rio-subtitle">
                            Các album khác
                        </div>
                    </div>
                    <div class="content">
                        <asp:DataList ID="dtlAnotherAlbum" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
                            <ItemTemplate>
                                <div class="thumbnail" style="margin: 0 0 5px 5px; text-align: center; background-color: #000;">
                                    <a href='/Album/<%# Eval("Slug") %>'>
                                        <img src='/ImageHandler.axd?image=<%# ResolveUrl(Eval("GalleryAvatar").ToString()) %>&Height=62' alt="" />
                                    </a>
                                </div>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
                </div>
                <div class="clear-fix">
                </div>
            </div>
            <div class="bottom table-row">
                <div class="left table-cell">
                    <div class="title">
                        <div class="table-row" style="width: 549px">
                        </div>
                    </div>
                </div>
                <div class="right table-cell">
                </div>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hiddenImageID" runat="server" />
</asp:Content>
